Fixed tests
authorKalita Alexey <kalita.alexey@outlook.com>
Wed, 8 Feb 2017 15:15:06 +0000 (18:15 +0300)
committerKalita Alexey <kalita.alexey@outlook.com>
Wed, 8 Feb 2017 15:15:06 +0000 (18:15 +0300)
tests/build.rs
tests/metadata.rs

index 75ca7dcee53247eb96e0cbc3cfd5a0e07093eb87..c37405e62421d4fc64eb33e512f88e17ea8036b9 100644 (file)
@@ -2510,7 +2510,12 @@ fn compiler_json_error_format() {
     {
         "reason":"compiler-message",
         "package_id":"bar 0.5.0 ([..])",
-        "target":{"kind":["lib"],"name":"bar","src_path":"[..]lib.rs"},
+        "target":{
+            "kind":["lib"],
+            "crate_types":["lib"],
+            "name":"bar",
+            "src_path":"[..]lib.rs"
+        },
         "message":"{...}"
     }
 
@@ -2524,21 +2529,36 @@ fn compiler_json_error_format() {
         },
         "features": [],
         "package_id":"bar 0.5.0 ([..])",
-        "target":{"kind":["lib"],"name":"bar","src_path":"[..]lib.rs"},
+        "target":{
+            "kind":["lib"],
+            "crate_types":["lib"],
+            "name":"bar",
+            "src_path":"[..]lib.rs"
+        },
         "filenames":["[..].rlib"]
     }
 
     {
         "reason":"compiler-message",
         "package_id":"foo 0.5.0 ([..])",
-        "target":{"kind":["bin"],"name":"foo","src_path":"[..]main.rs"},
+        "target":{
+            "kind":["bin"],
+            "crate_types":["bin"],
+            "name":"foo",
+            "src_path":"[..]main.rs"
+        },
         "message":"{...}"
     }
 
     {
         "reason":"compiler-artifact",
         "package_id":"foo 0.5.0 ([..])",
-        "target":{"kind":["bin"],"name":"foo","src_path":"[..]main.rs"},
+        "target":{
+            "kind":["bin"],
+            "crate_types":["bin"],
+            "name":"foo",
+            "src_path":"[..]main.rs"
+        },
         "profile": {
             "debug_assertions": true,
             "debuginfo": 2,
index 349de9fc195eeb5902dfa5e8e3eea7cbd51460eb..69dcf12f734804ee3ce894837a4a8049c1ca6313 100644 (file)
@@ -28,6 +28,9 @@ fn cargo_metadata_simple() {
                         "kind": [
                             "bin"
                         ],
+                        "crate_types": [
+                            "bin"
+                        ],
                         "name": "foo",
                         "src_path": "[..][/]foo[/]src[/]foo.rs"
                     }
@@ -93,6 +96,9 @@ fn cargo_metadata_with_deps_and_version() {
                         "kind": [
                             "lib"
                         ],
+                        "crate_types": [
+                            "lib"
+                        ],
                         "name": "baz",
                         "src_path": "[..]lib.rs"
                     }
@@ -125,6 +131,9 @@ fn cargo_metadata_with_deps_and_version() {
                         "kind": [
                             "lib"
                         ],
+                        "crate_types": [
+                            "lib"
+                        ],
                         "name": "bar",
                         "src_path": "[..]lib.rs"
                     }
@@ -157,6 +166,9 @@ fn cargo_metadata_with_deps_and_version() {
                         "kind": [
                             "bin"
                         ],
+                        "crate_types": [
+                            "bin"
+                        ],
                         "name": "foo",
                         "src_path": "[..]foo.rs"
                     }
@@ -218,6 +230,7 @@ fn workspace_metadata() {
                 "targets": [
                     {
                         "kind": [ "lib" ],
+                        "crate_types": [ "lib" ],
                         "name": "bar",
                         "src_path": "[..]bar[/]src[/]lib.rs"
                     }
@@ -237,6 +250,7 @@ fn workspace_metadata() {
                 "targets": [
                     {
                         "kind": [ "lib" ],
+                        "crate_types": [ "lib" ],
                         "name": "baz",
                         "src_path": "[..]baz[/]src[/]lib.rs"
                     }
@@ -291,6 +305,7 @@ fn workspace_metadata_no_deps() {
                 "targets": [
                     {
                         "kind": [ "lib" ],
+                        "crate_types": [ "lib" ],
                         "name": "bar",
                         "src_path": "[..]bar[/]src[/]lib.rs"
                     }
@@ -310,6 +325,7 @@ fn workspace_metadata_no_deps() {
                 "targets": [
                     {
                         "kind": [ "lib" ],
+                        "crate_types": ["lib"],
                         "name": "baz",
                         "src_path": "[..]baz[/]src[/]lib.rs"
                     }
@@ -351,6 +367,7 @@ const MANIFEST_OUTPUT: &'static str=
         "description": null,
         "targets":[{
             "kind":["bin"],
+            "crate_types":["bin"],
             "name":"foo",
             "src_path":"[..][/]foo[/]src[/]foo.rs"
         }],